package io.zpy.enums;

/**
 * @title: StatusCode
 * @description: 定义了状态码
 */
public enum StatusCode {

    Success(200,"成功"),
    Fail(-1,"失败"),
    Exception(500,"未知异常，请联系管理员"),
    NotFound(10010,"不存在"),
    Entity_Not_Exist(10011,"实体信息不存在"),
    Invalid_Params(10012,"请求参数不合法!"),
    UserInfo_LogOutORInfoOut(601,"未登录或登录信息过期，请登录"),
    UserInfo_Failed(10013,"用户信息请求失败");

    /**
     * 状态码
     */
    private Integer code;
    /**
     * 消息
     */
    private String msg;


    StatusCode(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
